/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Lenovo
 * Date: 2025-05-10
 * Time: 20:44
 */
//编写程序数一下 1到 100 的所有整数中出现多少个数字9
public class text {
    public static void main(String[] args){
        int n=0;
        for (int i = 0; i <= 100; i++) {
            if(i%10==9)
                n++;
            if(i/10==9)
                n++;
        }
        System.out.println("9出现的次数为"+n);
    }
}
